package com.arch.dev.server.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "authorities")
public class Authority extends AbstractTimestampEntity{
	private String userName;
	
	@Id
	@Column(name = "USERNAME", unique = true, nullable = false)
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	private String authority;

	@Column(name = "AUTHORITY", nullable = true)
	public String getAuthority() {
		return authority;
	}

	public void setAuthority(String authority) {
		this.authority = authority;
	}
	
	@Override
	public String toString() {

		return new String("username : " + userName + " authority : " + authority);

	}

}
